﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Simulacion.Fruits
{
    class Pineapple : Fruit
    {
        private double pLowMi, pLowSigma, pLowGamma, pJulMi, pJulSigma, pHighMi, pHighSigma;

        public Pineapple()
        {
            _life = 4;
            this.pLowMi = 2.3734;
            this.pLowSigma = 0.16026;
            this.pLowGamma = -1.6514;
            this.pJulMi = 6.4589;
            this.pJulSigma = 0.2117;
            this.pHighMi = 17.15;
            this.pHighSigma = 1.727;

            this._pLowMin = 6.5;
            this._pLowMax = 12.5;
            this._pHighMin = 14.0;
            this._pHighMax = 20.5;
            this._pJulMin = 5.5;
            this._pJulMax = 7.0;
        }

        protected override double GetVarPeriodLow()
        {
            return Distributions.Lognormal3P.GetDistributionValue(_pLowMin, _pLowMax, pLowMi, pLowSigma, pLowGamma);
        }

        protected override double GetVarPeriodHigh()
        {
            return Distributions.Normal.GetDistributionValue(_pHighMin, _pHighMax, pHighMi, pHighSigma);
        }

        protected override double GetVarPeriodJuly()
        {
            return Distributions.Cauchy.GetDistributionValue(_pJulMin, _pJulMax, pJulMi, pJulSigma);
        }

        protected override double GetFPeriodLow(double x)
        {
            return Distributions.Lognormal3P.fLognormal3P(x, pLowMi, pLowSigma, pLowGamma);
        }

        protected override double GetFPeriodHigh(double x)
        {
            return Distributions.Normal.fNormal(x, pHighMi, pHighSigma);
        }

        protected override double GetFPeriodJuly(double x)
        {
            return Distributions.Cauchy.fCauchy(x, pJulMi, pJulSigma);
        }

        public double PLowMi
        {
            get { return pLowMi; }
            set { pLowMi = value; }
        }

        public double PLowSigma
        {
            get { return pLowSigma; }
            set { pLowSigma = value; }
        }

        public double PLowGamma
        {
            get { return pLowGamma; }
            set { pLowGamma = value; }
        }

        public double PJulMi
        {
            get { return pJulMi; }
            set { pJulMi = value; }
        }

        public double PJulSigma
        {
            get { return pJulSigma; }
            set { pJulSigma = value; }
        }

        public double PHighMi
        {
            get { return pHighMi; }
            set { pHighMi = value; }
        }

        public double PHighSigma
        {
            get { return pHighSigma; }
            set { pHighSigma = value; }
        }
    }
}
